<h4><?php echo lang('Database Properties')?></h4>
<?php echo $dbProperties->getTable()?>
<h4><?php echo lang('Tables')?></h4>
<table border="0">
<tr>
	<th><?php echo lang('Table Name')?></th>
	<th><?php echo lang('Records')?></th>
	<th><?php echo lang('Actions')?></th>
</tr>
<?php
foreach($tables as $k => $t)
{
?>
<tr <?php echo ($k % 2 == 1) ? 'class="altRow"' : ''?>>
	<td><a href="<?php echo common::url('table.php?table='.rawurlencode($t['name']))?>"><?php echo $t['name']?></a></td>
	<td><?php echo $t['records']?></td>
	<td>
		<a href="<?php echo common::url('table.php?table='.rawurlencode($t['name']))?>"><?php echo lang('Properties')?></a> ::
		<a href="<?php echo common::url('query.php?sql='.rawurlencode('SELECT * FROM '.$t['name']))?>"><?php echo lang('Browse')?></a> ::
		<a href="<?php echo common::url('query.php?table='.rawurlencode($t['name']))?>"><?php echo lang('Query')?></a> ::
		<a href="<?php echo common::url('row.php?action=insert&table='.rawurlencode($t['name']).'&redirect=database.php')?>"><?php echo lang('Insert')?></a> ::
		<a href="<?php echo common::url('table.php?action=empty&table='.rawurlencode($t['name']))?>" onclick="return confirm('<?php echo javascript::escapeString(lang('Are you sure you want to delete all rows from this table?'))?>')"><?php echo lang('Empty')?></a> ::
		<a href="<?php echo common::url('table.php?action=drop&table='.rawurlencode($t['name']))?>" onclick="return confirm('<?php echo javascript::escapeString(lang('Are you sure you want to drop this table?'))?>')"><?php echo lang('Drop')?></a>
	</td>
</tr>
<?php
	$tableRecords += $t['records'];
}
?>
<tr>
	<td class="summary"><?php echo count($tables).lang(' table(s)')?></td>
	<td class="summary"><?php echo $tableRecords?></td>
</tr>
</table>
<h4><?php echo lang('Views')?></h4>
<table border="0">
<tr>
	<th><?php echo lang('View Name')?></th>
	<th><?php echo lang('View SQL')?></th>
	<th><?php echo lang('Actions')?></th>
</tr>
<?php
foreach($views as $k => $v)
{
?>
<tr <?php echo ($k % 2 == 1) ? 'class="altRow"' : ''?>>
	<td><?php echo $v['name']?></td>
	<td><?php echo common::truncateText($v['sql'], 50)?></td>
	<td>
		<a href="<?php echo common::url('query.php?sql='.rawurlencode('SELECT * FROM ' . $v['name']))?>"><?php echo lang('View')?></a> ::
		<a href="<?php echo common::url('view.php?action=edit&view='.$v['name'])?>"><?php echo lang('Edit')?></a> ::
		<a href="<?php echo common::url('view.php?action=drop&view='.$v['name'])?>" onclick="return confirm('<?php echo javascript::escapeString(lang('Are you sure you want to drop this view?'))?>')"><?php echo lang('Drop')?></a>
	</td>
</tr>
<?php
}
?>
<tr>
	<td class="summary"><?php echo count($views).lang(' view(s)')?></td>
	<td colspan="2">&nbsp;</td>
</tr>
</table>
<h4><?php echo lang('Triggers')?></h4>
<table border="0">
<tr>
	<td></td>
</tr>
</table>